package com.bsj.power.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bsj.power.common.def.entity.DeviceDuration;
import com.bsj.power.common.def.vo.DeviceDurationVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description
 * @Author zhaoyang
 * @Date 2024/7/11 19:15
 */
@Mapper
@Repository
public interface DeviceDurationMapper extends BaseMapper<DeviceDuration> {

    void addAll(@Param("list") List<DeviceDuration> durations);

    /**
     * 根据时间查询设备运行时长列表
     *
     * @param beginTime
     * @param endTime
     * @return
     */
    List<DeviceDurationVO> selectDeviceDurationByTime(@Param("beginTime") String beginTime, @Param("endTime") String endTime);
}
